package com.jast.business.service.impl;

import java.util.List;
import com.jast.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jast.business.mapper.BigdataHbaseKvLineMapper;
import com.jast.business.domain.BigdataHbaseKvLine;
import com.jast.business.service.IBigdataHbaseKvLineService;
import com.jast.common.core.text.Convert;

/**
 * Hbase监控指标近3天指标Service业务层处理
 * 
 * @author Jast
 * @date 2023-02-02
 */
@Service
public class BigdataHbaseKvLineServiceImpl implements IBigdataHbaseKvLineService 
{
    @Autowired
    private BigdataHbaseKvLineMapper bigdataHbaseKvLineMapper;

    /**
     * 查询Hbase监控指标近3天指标
     * 
     * @param id Hbase监控指标近3天指标主键
     * @return Hbase监控指标近3天指标
     */
    @Override
    public BigdataHbaseKvLine selectBigdataHbaseKvLineById(Long id)
    {
        return bigdataHbaseKvLineMapper.selectBigdataHbaseKvLineById(id);
    }

    /**
     * 查询Hbase监控指标近3天指标列表
     * 
     * @param bigdataHbaseKvLine Hbase监控指标近3天指标
     * @return Hbase监控指标近3天指标
     */
    @Override
    public List<BigdataHbaseKvLine> selectBigdataHbaseKvLineList(BigdataHbaseKvLine bigdataHbaseKvLine)
    {
        return bigdataHbaseKvLineMapper.selectBigdataHbaseKvLineList(bigdataHbaseKvLine);
    }

    /**
     * 新增Hbase监控指标近3天指标
     * 
     * @param bigdataHbaseKvLine Hbase监控指标近3天指标
     * @return 结果
     */
    @Override
    public int insertBigdataHbaseKvLine(BigdataHbaseKvLine bigdataHbaseKvLine)
    {
        bigdataHbaseKvLine.setCreateTime(DateUtils.getNowDate());
        return bigdataHbaseKvLineMapper.insertBigdataHbaseKvLine(bigdataHbaseKvLine);
    }

    /**
     * 更新/新增Hbase监控指标近3天指标
     *
     * @param bigdataHbaseKvLine Hbase监控指标近3天指标
     * @return 结果
     */
    @Override
    public int upsertBigdataHbaseKvLine(BigdataHbaseKvLine bigdataHbaseKvLine)
    {
                bigdataHbaseKvLine.setUpdateTime(DateUtils.getNowDate());
            return bigdataHbaseKvLineMapper.upsertBigdataHbaseKvLine(bigdataHbaseKvLine);
    }

    /**
     * 修改Hbase监控指标近3天指标
     * 
     * @param bigdataHbaseKvLine Hbase监控指标近3天指标
     * @return 结果
     */
    @Override
    public int updateBigdataHbaseKvLine(BigdataHbaseKvLine bigdataHbaseKvLine)
    {
        bigdataHbaseKvLine.setUpdateTime(DateUtils.getNowDate());
        return bigdataHbaseKvLineMapper.updateBigdataHbaseKvLine(bigdataHbaseKvLine);
    }

    /**
     * 批量删除Hbase监控指标近3天指标
     * 
     * @param ids 需要删除的Hbase监控指标近3天指标主键
     * @return 结果
     */
    @Override
    public int deleteBigdataHbaseKvLineByIds(String ids)
    {
        return bigdataHbaseKvLineMapper.deleteBigdataHbaseKvLineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除Hbase监控指标近3天指标信息
     * 
     * @param id Hbase监控指标近3天指标主键
     * @return 结果
     */
    @Override
    public int deleteBigdataHbaseKvLineById(Long id)
    {
        return bigdataHbaseKvLineMapper.deleteBigdataHbaseKvLineById(id);
    }
}
